@layout("/common/_container.html",{plugins:["ztree"],js:["/assets/modular/system/user/agent.js"]}){

<div class="layui-body-header">
    <span class="layui-body-header-title">代理用户管理</span>
</div>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <select id="examine">
                                    <option value="">请选择审核状态</option>
                                    <option value="0">待审核</option>
                                    <option value="1">审核通过</option>
                                    <option value="2">审核不通过</option>
                                </select>
                            </div>
                            <div class="layui-inline">
                                <input id="name" class="layui-input" type="text" placeholder="代理名称或手机号码"/>
                            </div>
                            <div class="layui-inline">
                                <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
                                @if(shiro.hasPermission("/mgr/school_add")){
                                <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>
                                @}
                                <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>导出</button>
                            </div>
                        </div>
                    </div>
                    <table class="layui-table" id="agentTable" lay-filter="agentTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="tableBar">
    {{#  if(d.examine == 0){ }}
    @if(shiro.hasPermission("/mgr/school_add")){
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="examine">审核</a>
    @}
    {{#  } }}
    @if(shiro.hasPermission("/mgr/school_edit")){
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>
    @}

</script>

<script type="text/html" id="statusTpl">
    <input type="checkbox" lay-filter="status" value="{{d.userId}}" lay-skin="switch" lay-text="正常|冻结" {{d.status=='ENABLE'?'checked':''}} />
</script>
@}